#include "stdafx.h"
#include "WorldEvents.h"
#include "../Functor.h"

// event raised when a new object has been added to the game world
/*extern*/ Delegate<world_event_handler>* WorldEvents::ObjectCreated = nullptr;
// event raised when a new object has been removed from the game world
/*extern*/ Delegate<world_event_handler>* WorldEvents::ObjectDestroyed = nullptr;

// event raised when a temple is clicked on by a player
/*extern*/ Delegate<world_event_handler>* WorldEvents::TempleClicked = nullptr;


void WorldEvents::Init(void)
{
	ObjectCreated = new Delegate < world_event_handler >;
	ObjectDestroyed = new Delegate < world_event_handler >;
	TempleClicked = new Delegate < world_event_handler >;
}

void WorldEvents::Shutdown(void)
{
	delete ObjectCreated;
	delete ObjectDestroyed;
	delete TempleClicked;
}